package com.xiaoyung.easyisapisdk.feign.api.form;

import java.util.List;

import com.alibaba.fastjson2.JSONObject;
import com.xiaoyung.easyisapisdk.common.form.BatchInsertParam;
import com.xiaoyung.easyisapisdk.common.form.BatchUpdateByGroupConditionsParam;
import com.xiaoyung.easyisapisdk.common.form.BatchUpdateParam;
import com.xiaoyung.easyisapisdk.common.form.CallFunctionParam;
import com.xiaoyung.easyisapisdk.common.form.CreateFileByTemplateParam;
import com.xiaoyung.easyisapisdk.common.form.DeleteByIdParam;
import com.xiaoyung.easyisapisdk.common.form.DeleteByIdsParam;
import com.xiaoyung.easyisapisdk.common.form.InsertParam;
import com.xiaoyung.easyisapisdk.common.form.SelectByIdParam;
import com.xiaoyung.easyisapisdk.common.form.SelectByIdsParam;
import com.xiaoyung.easyisapisdk.common.form.SelectMultipleTableParam;
import com.xiaoyung.easyisapisdk.common.form.SelectParam;
import com.xiaoyung.easyisapisdk.common.form.UpdateParam;
import com.xiaoyung.easyisapisdk.common.util.PageData;

import feign.Headers;
import feign.RequestLine;

/**
 * 基础数据服务接口
 */
public interface DataServiceApi {
	
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/form/dataService/insert")
	public PageData insert(InsertParam param);

	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/form/dataService/batchInsert")
	public Integer batchInsert(BatchInsertParam param);
	
	//列表 挨个按id修改
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/form/dataService/batchUpdate")
	public Integer batchUpdate(BatchUpdateParam param);
	
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/form/dataService/update")
	public PageData update(UpdateParam param);

	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/form/dataService/batchUpdateByGroupConditions")
	public Integer batchUpdateByGroupConditions(BatchUpdateByGroupConditionsParam param);
	
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/form/dataService/deleteById")
	public Integer deleteById(DeleteByIdParam param);
	
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/form/dataService/deleteByIds")
	public Integer deleteByIds(DeleteByIdsParam param);
	
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/form/dataService/selectById")
	public PageData selectById(SelectByIdParam param);
	
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/form/dataService/selectByIds")
	public List<PageData> selectByIds(SelectByIdsParam param);
	
	
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/form/dataService/select")
	public List<PageData> select(SelectParam param);

	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/form/dataService/selectMultipleTable")
	public List<PageData> selectMultipleTable(SelectMultipleTableParam param);

	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/form/dataService/createFileByTemplate")
	public JSONObject createFileByTemplate(CreateFileByTemplateParam param);
	// FileInfo
	
	@Headers("Content-Type: application/json")
	@RequestLine("POST /openapi/form/dataService/callFunction")
	public Object callFunction(CallFunctionParam param);
	
	/*@Headers("Content-Type: application/json")
	@RequestLine("POST /form/serviceapi/dataService/findTableByIdOrName")
	public Rest<TableEntity> findTableByIdOrName(GetTableParam param) ;*/
	
}
